<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    Promise状态:pending，fulfilled，rejected,
    只能从pending到fulfuilled或者pending到rejected
    <script>
        const p1 = new Promise((resolve,reject)=>{
            // resolve('ok')   pending -> fulfilled
            // reject('error')    pending -> rejected
        })
        console.log(p1)
    </script>
</body>
</html>